<template>
  <div id='manage'>
    <Table :columns="columns" :data="data"></Table>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  name: 'manage',
  components: {},
  props: {},
  data() {
    return {
      data: [],
      columns: [{
        type: 'selection',
        width: 60
      }, {
        title: '报警名称',
        key: 'name',
        minWidth: 220
      }, {
        title: '所属设备',
        key: 'mainname',
        ellipsis: true,
        minWidth: 220
      }, {
        title: '防区编号',
        key: 'chan',
        minWidth: 100
      }, {
        title: '级别',
        key: 'level',
        minWidth: 100
      }, {
        title: '报警分类',
        key: 'alarmTypeName',
        minWidth: 150
      }, {
        title: '布防时间',
        key: 'alarmtemplate',
        minWidth: 180
      }, {
        title: '最大延时',
        key: 'maxdelaytime',
        minWidth: 150
      }, {
        title: '最小间隔',
        minWidth: 150,
        key: 'minintervaltime'
      }, {
        title: '操作',
        key: 'linkConfig',
        minWidth: 150,
        render: (h) => {
          return h('div', [
            h('Button', {
              props: {
                type: 'primary'
              },
              on: {
                click: () => {
                }
              }
            }, '设置'),
            h('Button', {
              props: {
                type: 'primary'
              },
              on: {
                click: () => {
                }
              }
            }, '删除')
          ])
        }
      }]
    }
  },
  computed: {},
  watch: {},
  methods: {},
  created() {
    axios.get('/api/alarm/manage').then(res => {
      this.data = res.data
    })
  },
  mounted() { }
}
</script>

<style scoped>

</style>
